#ifndef IMAGES_H
#define IMAGES_H
#include <Arduino.h>

typedef struct
{
    uint32_t color;
    const uint8_t *data PROGMEM; // 图像数据指针
} image_layer_t;

typedef struct
{
    uint8_t width;  // 图像宽度
    uint8_t height; // 图像高度
    uint8_t layers_num;
    image_layer_t layers[];
} image_t;

typedef struct
{
    uint8_t frame_num;
    image_t frames[];
} animation_t;

/////////////////////////////////////////////////////////////////
const uint8_t img_timer_layer_1[] PROGMEM = {
    0x7E,
    0x42,
    0x24,
    0x18,
    0x24,
    0x42,
    0x42,
    0x7E};

const uint8_t img_timer_layer_2[] PROGMEM = {
    0x00,
    0x24,
    0x18,
    0x00,
    0x00,
    0x00,
    0x18,
    0x00};

const image_t img_timer = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xFFFFFF, .data = img_timer_layer_1},
        {.color = 0xFFFF00, .data = img_timer_layer_2}}};
/////////////////////////////////////////////////////////////////
const uint8_t img_sunny_layer_1[] PROGMEM = {
    0x91,
    0x42,
    0x00,
    0x01,
    0x80,
    0x00,
    0x42,
    0x89};

const uint8_t img_sunny_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x18,
    0x3C,
    0x3C,
    0x18,
    0x00,
    0x00};
const image_t img_sunny = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xF39C12, .data = img_sunny_layer_1},
        {.color = 0xFFFF00, .data = img_sunny_layer_2}}};

const uint8_t img_rainy_light_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_rainy_light_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x49,
    0x00,
    0x00};

const image_t img_rainy_light = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_rainy_light_layer_1},
        {.color = 0x0193FC, .data = img_rainy_light_layer_2}}};

const uint8_t img_rainy_moderate_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_rainy_moderate_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x49,
    0x92,
    0x00};

const image_t img_rainy_moderate = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_rainy_moderate_layer_1},
        {.color = 0x0193FC, .data = img_rainy_moderate_layer_2}}};
const uint8_t img_rainy_heavy_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_rainy_heavy_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x49,
    0x92,
    0x24};

const image_t img_rainy_heavy = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_rainy_heavy_layer_1},
        {.color = 0x0193FC, .data = img_rainy_heavy_layer_2}}};

const uint8_t img_rainy_storm_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_rainy_storm_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0xA4,
    0x49,
    0x92,
    0x25};

const image_t img_rainy_storm = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_rainy_storm_layer_1},
        {.color = 0x0193FC, .data = img_rainy_storm_layer_2}}};
const uint8_t img_snowy_light_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_snowy_light_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x49,
    0x00,
    0x00};

const image_t img_snowy_light = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_snowy_light_layer_1},
        {.color = 0xFFFFFF, .data = img_snowy_light_layer_2}}};
const uint8_t img_snowy_moderate_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_snowy_moderate_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x49,
    0x92,
    0x00};

const image_t img_snowy_moderate = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_snowy_moderate_layer_1},
        {.color = 0xFFFFFF, .data = img_snowy_moderate_layer_2}}};
const uint8_t img_snowy_heavy_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_snowy_heavy_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x24,
    0x49,
    0x92,
    0x24};

const image_t img_snowy_heavy = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_snowy_heavy_layer_1},
        {.color = 0xFFFFFF, .data = img_snowy_heavy_layer_2}}};
const uint8_t img_snowy_storm_layer_1[] PROGMEM = {
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_snowy_storm_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0xB5,
    0x49,
    0x92,
    0xAD};

const image_t img_snowy_storm = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_snowy_storm_layer_1},
        {.color = 0xFFFFFF, .data = img_snowy_storm_layer_2}}};
const uint8_t img_cloudy_layer_1[] PROGMEM = {
    0x00,
    0x0C,
    0x72,
    0x81,
    0xFF,
    0x00,
    0x00,
    0x00};

const image_t img_cloudy = {
    .width = 8,
    .height = 8,
    .layers_num = 1,
    .layers = {
        {.color = 0xEBEBEB, .data = img_cloudy_layer_1}}};
const uint8_t img_windy_layer_1[] PROGMEM = {
    0x00,
    0x0E,
    0x02,
    0xFE,
    0x00,
    0x7F,
    0x01,
    0x03};

const image_t img_windy = {
    .width = 8,
    .height = 8,
    .layers_num = 1,
    .layers = {
        {.color = 0x8CCDF8, .data = img_windy_layer_1}}};
///////////////////////////////////
const uint8_t img_temp_hum_layer_1[] PROGMEM = {
    0x00,
    0x20,
    0x50,
    0x50,
    0x50,
    0x50,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_2[] PROGMEM = {
    0x00,
    0x02,
    0x02,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_3[] PROGMEM = {
    0x00,
    0x00,
    0x05,
    0x07,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_4[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x20,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_5[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x20,
    0x00,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_6[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x20,
    0x00,
    0x00};

const uint8_t img_temp_hum_layer_7[] PROGMEM = {
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x70,
    0x00};

const image_t img_temp_hum = {
    .width = 8,
    .height = 8,
    .layers_num = 7,
    .layers = {
        {.color = 0xFFFFFF, .data = img_temp_hum_layer_1},
        {.color = 0x6F6FF7, .data = img_temp_hum_layer_2},
        {.color = 0x0000FF, .data = img_temp_hum_layer_3},
        {.color = 0xF9D37F, .data = img_temp_hum_layer_4},
        {.color = 0xF5A050, .data = img_temp_hum_layer_5},
        {.color = 0xE74C3C, .data = img_temp_hum_layer_6},
        {.color = 0xFF0000, .data = img_temp_hum_layer_7}}};

///////////////////////////////////////
const uint8_t img_date_layer_1[] PROGMEM = {
    0x06,
    0x02,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00};

const uint8_t img_date_layer_2[] PROGMEM = {
    0x00,
    0x7C,
    0x02,
    0x02,
    0x02,
    0x02,
    0x02,
    0x00};

const uint8_t img_date_layer_3[] PROGMEM = {
    0x00,
    0x00,
    0x44,
    0x74,
    0x74,
    0x74,
    0x74,
    0x00};

const uint8_t img_date_layer_4[] PROGMEM = {
    0x00,
    0x00,
    0x38,
    0x08,
    0x08,
    0x08,
    0x08,
    0x00};

const image_t img_date = {
    .width = 8,
    .height = 8,
    .layers_num = 4,
    .layers = {
        {.color = 0xFFFF00, .data = img_date_layer_1},
        {.color = 0x9C9B9B, .data = img_date_layer_2},
        {.color = 0xFFFFFF, .data = img_date_layer_3},
        {.color = 0xFF0000, .data = img_date_layer_4}}};
////////////////////////////////////
const uint8_t img_config_layer_1[] PROGMEM = {
    0x00,
    0xE0,
    0xA0,
    0xE0,
    0x00,
    0xEE,
    0xAA,
    0xEE};

const uint8_t img_config_layer_2[] PROGMEM = {
    0x00,
    0x0E,
    0x0A,
    0x0E,
    0x00,
    0x00,
    0x00,
    0x00};

const image_t img_config = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0x0000FF, .data = img_config_layer_1},
        {.color = 0xFFFFFF, .data = img_config_layer_2}}};
/////////////////////////////////
const uint8_t img_info_note_layer_1[] PROGMEM = {
    0x00,
    0x38,
    0x44,
    0x82,
    0x82,
    0x82,
    0x44,
    0x38};

const uint8_t img_info_note_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x28,
    0x6C,
    0x6C,
    0x7C,
    0x28,
    0x00};

const image_t img_info_note = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xFFFFFF, .data = img_info_note_layer_1},
        {.color = 0xE8EAC3, .data = img_info_note_layer_2}}};
const uint8_t img_info_danger_layer_1[] PROGMEM = {
    0x00,
    0x38,
    0x44,
    0x82,
    0x82,
    0x82,
    0x44,
    0x38};

const uint8_t img_info_danger_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x28,
    0x6C,
    0x6C,
    0x7C,
    0x28,
    0x00};

const image_t img_info_danger = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xFFFFFF, .data = img_info_danger_layer_1},
        {.color = 0xEC6B81, .data = img_info_danger_layer_2}}};
const uint8_t img_info_success_layer_1[] PROGMEM = {
    0x00,
    0x38,
    0x44,
    0x82,
    0x82,
    0x82,
    0x44,
    0x38};

const uint8_t img_info_success_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x28,
    0x6C,
    0x6C,
    0x7C,
    0x28,
    0x00};

const image_t img_info_success = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xFFFFFF, .data = img_info_success_layer_1},
        {.color = 0x4A7446, .data = img_info_success_layer_2}}};

const uint8_t img_info_warning_layer_1[] PROGMEM = {
    0x00,
    0x38,
    0x44,
    0x82,
    0x82,
    0x82,
    0x44,
    0x38};

const uint8_t img_info_warning_layer_2[] PROGMEM = {
    0x00,
    0x00,
    0x28,
    0x6C,
    0x6C,
    0x7C,
    0x28,
    0x00};

const image_t img_info_warning = {
    .width = 8,
    .height = 8,
    .layers_num = 2,
    .layers = {
        {.color = 0xFFFFFF, .data = img_info_warning_layer_1},
        {.color = 0xEBF706, .data = img_info_warning_layer_2}}};

#endif